import { createI18n } from "vue-i18n";
import { getLocale } from "@/utils/init"; // 这个方案是获取当前浏览器的语言环境，代码见下面
import messages from "@/locales";
 
const i18n = createI18n({
  legacy: false,
  locale: getLocale(),
  fallbackLocale: "zh",
  messages,
});

export default i18n;